Skip to content

Conversation

@llvmbot
Copy link
Member

@llvmbot llvmbot commented Feb 12, 2025

Backport 84fe1f6 9f61a60

Requested by: @lhames

lhames and others added 2 commits February 15, 2025 18:22
The find-dynamic-unwind-info callback registration APIs in libunwind
limit the number of callbacks that can be registered. If we use multiple
UnwindInfoManager instances, each with their own own callback function
(as was the case prior to this patch) we can quickly exceed this limit
(see llvm#126611).

This patch updates the UnwindInfoManager class to use a singleton
pattern, with the single instance shared between all LLVM JITs in the
process.

This change does _not_ apply to compact unwind info registered through
the ORC runtime (which currently installs its own callbacks).

As a bonus this change eliminates the need to load an IR "bouncer"
module to supply the unique callback for each instance, so support for
compact-unwind can be extended to the llvm-jitlink tools (which does not
support adding IR).

(cherry picked from commit 84fe1f6)
@tstellar tstellar merged commit d135ed0 into llvm:release/20.x Feb 16, 2025
10 of 14 checks passed
@github-actions
Copy link

@lhames (or anyone else). If you would like to add a note about this fix in the release notes (completely optional). Please reply to this comment with a one or two sentence description of the fix. When you are done, please add the release:note label to this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

4 participants